import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { UsersComponent } from './users.component';

import { HomeComponent } from './home/home.component';
import { ActivateComponent } from './activate/activate.component';
import { ForgetComponent } from './forget/forget.component';
import { IndexComponent } from './index/index.component';
import { MessageComponent } from './message/message.component';
import { RegComponent } from './reg/reg.component';
import { SetComponent } from './set/set.component';

@NgModule({
    imports: [
        RouterModule.forChild([
            {
                path: '', component: UsersComponent,
                children: [
                    {
                        path: 'home',
                        component: HomeComponent
                    }, {
                        path: 'activate',
                        component: ActivateComponent
                    }, {
                        path: 'forget',
                        component: ForgetComponent
                    }, {
                        path: 'index',
                        component: IndexComponent
                    }, {
                        path: 'message',
                        component: MessageComponent
                    }, {
                        path: 'reg',
                        component: RegComponent
                    }, {
                        path: 'set',
                        component: SetComponent
                    }, {
                        path: '',
                        redirectTo: '/users/home',
                        pathMatch: 'full'
                    },
                ]
            }
        ])
    ],
    exports: [
        RouterModule
    ]
})
export class HomeRoutingModule { }
